package com.book.chapter.entity;

import java.io.Serializable;

/***
 * @Author Lin
 * @Date Create By 12:02 2017/10/4
 * @Description 章节实体目录
 */
public class Chapter implements Serializable{
    private static final long serialVersionUID = 4911200863368746091L;
    private String chapterTitle;
    private String chapterUrl;

    public String getChapterTitle() {
        return chapterTitle;
    }

    public void setChapterTitle(String chapterTitle) {
        this.chapterTitle = chapterTitle;
    }

    public String getChapterUrl() {
        return chapterUrl;
    }

    public void setChapterUrl(String chapterUrl) {
        this.chapterUrl = chapterUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Chapter chapter = (Chapter) o;

        if (!chapterTitle.equals(chapter.chapterTitle)) return false;
        return chapterUrl.equals(chapter.chapterUrl);
    }

    @Override
    public int hashCode() {
        int result = chapterTitle.hashCode();
        result = 31 * result + chapterUrl.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "Chapter{" +
                "chapterTitle='" + chapterTitle + '\'' +
                ", chapterUrl='" + chapterUrl + '\'' +
                '}';
    }
}
